package com.wwj.study.rmi.rpc.client;

import java.lang.reflect.Proxy;

public class RpcClientProxy {

    public <T> T clientProxy(Class<T> clazz,String hosts,int port) {
        return (T) Proxy.newProxyInstance(clazz.getClassLoader(), new Class[]{ clazz}, new RpcClientInvocationHandler(hosts,port));
    }
}
